home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm1 / intsdkss.lha / include / net / af.h next >
C/C++ Source or Header  |  1996-04-09  |  2KB  |  52 lines

  1. #ifndef NET_AF_H
  2. #define NET_AF_H
  3. /*
  4.  * Copyright (c) 1980, 1986 Regents of the University of California.
  5.  * All rights reserved.
  6.  *
  7.  * Redistribution and use in source and binary forms are permitted
  8.  * provided that the above copyright notice and this paragraph are
  9.  * duplicated in all such forms and that any documentation,
  10.  * advertising materials, and other materials related to such
  11.  * distribution and use acknowledge that the software was developed
  12.  * by the University of California, Berkeley.  The name of the
  13.  * University may not be used to endorse or promote products derived
  14.  * from this software without specific prior written permission.
  15.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  16.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  17.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  18.  *
  19.  *    @(#)af.h        7.3 (Berkeley) 6/27/88
  20.  */
  21.  
  22. /*
  23.  * Address family routines,
  24.  * used in handling generic sockaddr structures.
  25.  *
  26.  * Hash routine is called
  27.  *    af_hash(addr, h);
  28.  *    struct sockaddr *addr; struct afhash *h;
  29.  * producing an afhash structure for addr.
  30.  *
  31.  * Netmatch routine is called
  32.  *    af_netmatch(addr1, addr2);
  33.  * where addr1 and addr2 are sockaddr *.  Returns 1 if network
  34.  * values match, 0 otherwise.
  35.  */
  36. struct afswitch {
  37.     void    (*af_hash)(struct sockaddr *, struct afhash *);
  38.     int    (*af_netmatch)(struct sockaddr *, struct sockaddr *);
  39. };
  40.  
  41. struct afhash {
  42.     u_int    afh_hosthash;
  43.     u_int    afh_nethash;
  44. };
  45.  
  46. #ifdef KERNEL
  47. #if 0
  48. extern struct afswitch afswitch[];
  49. #endif
  50. #endif
  51. #endif
  52.